//
//  JCLComposeTypeButton.swift
//  WeiBo
//
//  Created by DDC on 2017/9/21.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit

class JCLComposeTypeButton: UIControl {

    /// 按钮图标
    @IBOutlet weak var iconView: UIImageView!

    /// 按钮文字
    @IBOutlet weak var titleLabel: UILabel!
    
    /// 按钮点击跳转的控制器名称
    var clsName:String?
    
    class func createComposeButton(imageName:String,title:String)-> JCLComposeTypeButton {
        
        let nib = UINib(nibName: "JCLComposeTypeButton", bundle: nil)
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! JCLComposeTypeButton
        
        btn.iconView.image = UIImage(named: imageName)
        btn.titleLabel.text = title
        
        return btn
    }

}
